<?php
/**
 * User: xzq
 * Date: 2018/8/7
 * Time: 16:26
 */

namespace app\library\model;
use think\Model;

class Code extends Model
{
    // 定义时间戳字段名
    protected $createTime = 'ctime';
    protected $updateTime = '';
    protected $autoWriteTimestamp = true;

    /**
     * 获取二维码路径
     * @param $map
     */
    public function getCode($map){
        $res = self::get($map);
        return $res->code ? $res->code : false;
    }
}